if (CONFIG_BACKTRACE_POSIX_ENABLE)
set(BACKTRACE     backtrace_posix.c)

elseif (CONFIG_BACKTRACE_ARMCC_ENABLE)
set(BACKTRACE     backtrace_armcc.c)

else()
message("please choice which plat for backtrace")

endif()

set(source backtrace_test.c)

add_definitions(
  #  -O3 -g
    -W -Wall
    -g -rdynamic
)

set(CMAKE_EXE_LINKER_FLAGS "-Wl,-Map=backtrace.map")

add_library(backtrace
            STATIC
            ${BACKTRACE})

#link_libraries(backtrace)
add_executable(backtrace.run
                ${source}
                ${BACKTRACE})
